#include<iostream>
using namespace std;
class Student{
	private:
	string Name;
	int age,studentID;
	public:
	int a,b,c,d;
    int average()
    {
	return (a+b+c+d)/4;
    }
    int Init(string Name_,int age_,int studentID_,int a_,int b_,int c_,int d_)
    {
	Name=Name_;
	age=age_;
	studentID=studentID_;
	a=a_;
	b=b_;
	c=c_;
	d=d_;
	return 0;
    }
};
int main()
{
	string Name;
	int age,studentID;
	int a,b,c,d;
	Student r;
	cin>>Name>>age>>studentID>>a>>b>>c>>d;
	r.Init(Name,age,studentID,a,b,c,d);
	cout<<r.average()<<endl;
	return 0;
}